Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Versioned documenation hosting #104

Merged
merged 73 commits into from
Jan 28, 2022
Merged

Versioned documenation hosting #104

merged 73 commits into from
Jan 28, 2022

Conversation

yardasol
Copy link
Contributor

@yardasol yardasol commented Jan 19, 2022

Summary of changes

This PR enables versioned documentation on the github pages website. You'll need to clone the repo and build the website yourself using the included doc_environment.yml file to get all the necessary packages.

Specifically, this PR

  • Splits the monolithic environment.yml file into a build/test verison (environment.yml) and a documentation version (doc/doc_environment.yml), and use each in their respective workflow
  • Adds the sphinx-multiversion and sphinxcontib-apidoc packages to the conda environment in the deploy-docs workflow
  • Adds configuration options for the above packages to doc/conf.py
  • Updates the instructions to build the docs in the readme using the new doc/conf.py file.
  • Adds an html sidebar template for a read-the-docs style version selection menu (doc/_templates/versions.html)
  • Tightens up the triggers for our workflows:
    • deploy-docs now can be triggered by releases
    • cache-dependencies now makes separate dependency caches for the new environment.yml dependencies and the doc_environment.yml dependencies.
    • test-saltproc now only runs when pushes to the source code and tests are made.
  • Adds manual triggers for all workflows.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Required for Merging

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
    • CI tests pass
    • Local tests pass (including Serpent2 integration tests)

Associated Issues and PRs

Associated Developers

Checklist for Reviewers

Reviewers should use this link to get to the
Review Checklist before they begin their review.

@pep8speaks
Copy link
Contributor

pep8speaks commented Jan 19, 2022

Hello @yardasol! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 23:1: E402 module level import not at top of file

Comment last updated at 2022-01-28 22:52:32 UTC

@yardasol yardasol marked this pull request as ready for review January 27, 2022 18:44
@yardasol yardasol requested a review from munkm January 27, 2022 18:44
@yardasol
Copy link
Contributor Author

@pep8speaks is saying that the from saltproc.version import __version__ statment needs to be at the top of the file, but we need to add saltproc to the syspath before we are able to execute tthe statement!

@LukeSeifert
Copy link
Contributor

I'm not familiar with YAML, but the code looks good to me. However, when I tried following the build directions given in the readme, I got an error. When I changed to the master branch and followed those directions, I did not get an error and was able to build successfully. I included the error message I got here:

Running Sphinx v2.4.0

Extension error:
Could not import extension sphinxcontrib.apidoc (exception: No module named 'sphinxcontrib.apidoc')
Makefile:53: recipe for target 'html' failed
make: *** [html] Error 2

@yardasol
Copy link
Contributor Author

yardasol commented Jan 28, 2022

@LukeSeifert Did you make a conda environment from the doc-environent.yml file? Regardless, I think I do need to specify that user's will need to install the conda environment to build the docs.

@yardasol
Copy link
Contributor Author

@munkm is the language I use to describe conda vs mamba appropriate and neutral? Don't want to ruffle any feathers...

@yardasol
Copy link
Contributor Author

@LukeSeifert I changed the instructions. Could you try it again and let me know?

Copy link
Member

@munkm munkm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few minor comments!

.github/workflows/cache-dependencies.yml Show resolved Hide resolved
doc/doc-environment.yml Show resolved Hide resolved
doc/installation.rst Show resolved Hide resolved

After these steps, the website will be found in `saltproc/doc/_build/html`.

_Note_: We recommend using [`mamba`](https://github.com/mamba-org/mamba) CLI tool to install packages quickly. SaltProc has a compltex package dependency structure which can result is long environment solve times in the default ``conda`` solver. ``mamba`` is a reimplementation of ``conda`` in ``C++`` and we have found it is significantly faster.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the future, you can import the readme in the docs so that you don't have to repeat the same info twice. That way both don't need to be updated if something changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The formatting for the .rst files and the .md files is slightly different. I'll need to think of a solution to this later.

README.md Outdated
following steps
The entire contents of that
website can be built from the `doc` directory in the repositiory using
the following steps
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a few other env tools that exist. You should be explicit here that these directions are assuming a conda environment and we haven't tried it with another manager (and don't necessarily recommend it).

.github/workflows/deploy-docs.yml Show resolved Hide resolved
doc/installation.rst Show resolved Hide resolved

Once all the dependencies are installed, SaltProc can be installed by
running the following commands from within the cloned directory
repository:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
repository:
repository (and assuming the environment has been activated):

@@ -71,7 +72,7 @@

NAME = "saltproc"
MAINTAINER = "Oleksandr Yardas"
MAINTAINER_EMAIL = "[email protected]"
MAINTAINER_EMAIL = "[email protected]"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are you sure you want all messages to go to your personal email? We could make a mailing list.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's make a mailing list. I'll revert back to the googlegroups email here

@munkm
Copy link
Member

munkm commented Jan 28, 2022

@munkm is the language I use to describe conda vs mamba appropriate and neutral? Don't want to ruffle any feathers...

Yes I think your language is good!

@yardasol yardasol requested a review from munkm January 28, 2022 22:55
@munkm munkm merged commit 66bbd90 into arfc:master Jan 28, 2022
github-actions bot pushed a commit that referenced this pull request Jan 28, 2022
@yardasol yardasol deleted the vc-docs branch March 9, 2022 19:00
@yardasol yardasol restored the vc-docs branch March 9, 2022 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants